﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace domainNames
{
    class Program
    {
        static void Main(string[] args)
        {


            Regex regex = new Regex(@"([a-zA-Z_\-\./]+)://([a-zA-Z_\-\.]+)/([a-zA-Z\.\-_/]+)");
            String text =
              "http://www.devbg.org/forum/index.php ";
            MatchCollection matches = regex.Matches(text);
            foreach (Match match in matches)
            {
                Console.Write("[protocol] = {0}, [server] = {1},[resource] = {2} ", match.Groups[1], match.Groups[2], match.Groups[3]);
            }

        }
    }
}
